<?php

class Dbutils
{
    public static function getConn(): false|mysqli
    {
        $hostname = "localhost";
        $userName = "root";
        $password = "admin123";
        $database = "student_manage";

        $connection = mysqli_connect($hostname, $userName, $password, $database);
        if (mysqli_connect_error()) {
            echo "连接错误：" . mysqli_connect_error();
        }
        return $connection;
    }


}